<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style:none;
        }
        a {
            text-decoration: none;
        }
        .box {
            width: 302px;
            overflow: hidden;
            border: 1px solid #666;
            text-align: center;
            margin: 100px auto;
        }
        .right,
        .center,
        .left {
            float: left;
        }
        .right ul,
        .left ul {
            overflow: hidden;
            
        }
        .right ul li,
        .left ul li {
            width: 50px;
            height: 27px;
            border-bottom: 1px solid #666;
            line-height: 27px;
            background: url('images/lili.jpg') repeat-x;
            font-size: 14px;
        }
        .center ul{
            position: relative;
            width: 200px;
            height: 250px;
            border-right: 1px solid #666;
            border-left: 1px solid #666;
            
        }
        .center ul li{
            position: absolute;
            left: 0;
            top: 0;
            display:none;
            
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">
            <ul>
                <li><a href="javascript:void(0)">女靴</a></li>
                <li><a href="javascript:void(0)">雪地靴</a></li>
                <li><a href="javascript:void(0)">冬裙</a></li>
                <li><a href="javascript:void(0)">呢大衣</a></li>
                <li><a href="javascript:void(0)">毛衣</a></li>
                <li><a href="javascript:void(0)">棉服</a></li>
                <li><a href="javascript:void(0)">女裤</a></li>
                <li><a href="javascript:void(0)">羽绒服</a></li>
                <li><a href="javascript:void(0)">牛仔裤</a></li>
            </ul>
        </div>
        <div class="center">
            <ul>
                <li style='display:block;'><a href="javascript:void(0)"><img src="./images/女靴.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/雪地靴.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/冬裙.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/呢大衣.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/毛衣.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/棉服.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/女裤.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/羽绒服.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/牛仔裤.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/女包.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/男靴.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/登山鞋.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/皮带.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/围巾.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/皮衣.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/男毛衣.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/男棉服.jpg" alt=""></a></li>
                <li><a href="javascript:void(0)"><img src="./images/男包.jpg" alt=""></a></li>
            </ul>
        </div>
        <div class="right">
            <ul>
                <li><a href="javascript:void(0)">女包</a></li>
                <li><a href="javascript:void(0)">男靴</a></li>
                <li><a href="javascript:void(0)">登山鞋</a></li>
                <li><a href="javascript:void(0)">皮带</a></li>
                <li><a href="javascript:void(0)">围巾</a></li>
                <li><a href="javascript:void(0)">皮衣</a></li>
                <li><a href="javascript:void(0)">男毛衣</a></li>
                <li><a href="javascript:void(0)">男棉服</a></li>
                <li><a href="javascript:void(0)">男包</a></li>
            </ul>
        </div>
    </div>
</body>
<script>
    //获取元素
    var leftliList = document.querySelectorAll('.left li');
    var centerliList = document.querySelectorAll('.center li')
    var rightliList = document.querySelectorAll('.right li')

    //注册事件
    //当鼠标放于左边Li上面,中间的对应下标的li标签显示出来
    for(var i = 0; i < leftliList.length; i++){
        leftliList[i].onmouseenter = leftliListMouseenter
    }
    function leftliListMouseenter() {
        for(var i = 0; i < leftliList.length; i++) {
            if(leftliList[i] == this) {
                centerliList[i].style.display = 'block';
                var newi = i;
            }
        }
        for(var j = 0; j < centerliList.length; j++) {
            if(j != newi){
                centerliList[j].style.display = ''
            }   
        }
    }
    //当鼠标放于右边Li上面,中间的对应下标的li标签显示出来
    for(var i = 0; i < rightliList.length; i++) {
        rightliList[i].onmouseenter = rightliListMouseenter
    }
    function rightliListMouseenter() {
        for(var i = 0; i < rightliList.length; i++) {
            if(rightliList[i] == this) {
                var newi = i + leftliList.length;
                centerliList[newi].style.display = 'block';
            }
        }
        for(var j = 0; j < centerliList.length; j++) {
            if(j != newi){
                centerliList[j].style.display = ''
            }   
        }
    }
</script>
<script src='../jquery-1.12.4.js'></script>
<script>
    // $(function(){
    //     $('.left li').on('mouseenter',function(){
    //         $('.center li').eq($(this).index()).show().siblings().hide()
    //     })
    //     $('.right li').on('mouseenter',function(){
    //         $('.center li').eq($(this).index()+$('.left li').length).show().siblings().hide()
    //     })
    // })
</script>

</html>